﻿using FluentNHibernate.Conventions;

namespace Business.Entity.Sistema.Terminal
{
    public class ConfTerminalRepository : RepositoryBase<ConfTerminal>
    {
        public static ConfTerminal GetByChave(string chave)
        {
            var l = GetListAtivos(GetQueryOver().Where(terminal => terminal.Chave == chave));
            if (l.IsEmpty())
            {
                return null;
            }
            else
            {
                return l[0];
            }
        }
    }
}
